package org.msn.server.database;

import io.netty.channel.ChannelHandlerContext;
import org.msn.config.RoomInfo;

import java.util.List;

public interface Repository {

    List<ChannelHandlerContext> getAllRoomUser(String roomName);

    List<RoomInfo> getAllRoom();

    boolean addRoomInfo(RoomInfo roomInfo);

    boolean addUserToRoom(ChannelHandlerContext ctx, String username, String name);

    RoomInfo getRoomByName(String roomName);

    Integer getRoomAllUserByName(String roomName);

    boolean removeUserFromRoom(String roomName, ChannelHandlerContext ctx);

    boolean removeRoomByName(String roomName);

    List<ChannelHandlerContext> getRoomAllUserIPByName(String name);

    List<String> getAllRoomName();
}
